import { Controller } from 'egg';
import { Result } from '../util/result';
export default class ChartController extends Controller {
  async getAreaBarData() {
    const { ctx } = this;
    const results = await this.ctx.service.patentChart.getAreaData();
    ctx.body = new Result(results);
  }
  async getConversionStateChart() {
    const { ctx } = this;
    const results =
      await this.ctx.service.patentChart.getConversionStateChart();
    ctx.body = new Result(results);
  }
  async getTotal() {
    const { ctx } = this;
    const results =
      await this.ctx.service.patentChart.getTotal();
    ctx.body = new Result(results);
  }
}
